# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Placeholder for internal Python strict & test compatibility macro.

# Description:
# Build rules for libraries and ops in Neural Structured Learning.

package(
    default_applicable_licenses = ["//neural_structured_learning:license"],
    default_visibility = ["//visibility:public"],
)

licenses(["notice"])

py_library(
    name = "lib",
    srcs = ["__init__.py"],
    deps = [
        ":abstract_gen_neighbor",
        ":adversarial_neighbor",
        ":distances",
        ":regularizer",
        ":utils",
    ],
)

# The build targets below are alphabetically sorted.

py_library(
    name = "abstract_gen_neighbor",
    srcs = ["abstract_gen_neighbor.py"],
    deps = [
    ],
)

py_library(
    name = "adversarial_neighbor",
    srcs = ["adversarial_neighbor.py"],
    deps = [
        ":abstract_gen_neighbor",
        ":utils",
        # package absl/logging
        # package tensorflow
    ],
)

py_test(
    name = "adversarial_neighbor_test",
    srcs = ["adversarial_neighbor_test.py"],
    deps = [
        ":adversarial_neighbor",
        # package absl/testing:parameterized
        "//neural_structured_learning/configs",
        # package numpy
        # package tensorflow
        # package tensorflow framework_test_lib,
    ],
)

py_library(
    name = "distances",
    srcs = ["distances.py"],
    deps = [
        "//neural_structured_learning/configs",
        # package tensorflow
    ],
)

py_test(
    name = "distances_test",
    srcs = ["distances_test.py"],
    deps = [
        ":distances",
        "//neural_structured_learning/configs",
        # package numpy
        # package tensorflow
    ],
)

py_library(
    name = "regularizer",
    srcs = ["regularizer.py"],
    deps = [
        ":distances",
        ":utils",
        # package tensorflow
    ],
)

py_test(
    name = "regularizer_test",
    srcs = ["regularizer_test.py"],
    deps = [
        ":regularizer",
        "//neural_structured_learning/configs",
        # package numpy
        # package tensorflow
    ],
)

py_library(
    name = "utils",
    srcs = ["utils.py"],
    deps = [
        "//neural_structured_learning/configs",
        # package six
        # package tensorflow
    ],
)

py_test(
    name = "utils_test",
    size = "small",
    srcs = ["utils_test.py"],
    deps = [
        ":utils",
        # package absl/testing:parameterized
        "//neural_structured_learning/configs",
        # package numpy
        # package tensorflow
        # package tensorflow framework_test_lib,
    ],
)
